
import 'package:cunyutech_flutter_ui/cunyutech_flutter_ui.dart';
import 'package:flutter/material.dart';

class CYIconButton extends StatelessWidget {

  final double size;
  final String icon;
  final VoidCallback onTap;
  final EdgeInsetsGeometry margin;
  final Color color;
  final BlendMode mode;
  final EdgeInsetsGeometry padding;

  const CYIconButton({Key key, this.padding, this.margin, this.color, this.mode, this.size = CYHeight.Default, this.icon, this.onTap }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: margin,
      child: GestureDetector(
      onTap: onTap,
        child: Container(
          width: size,
          height: size,
          margin: padding,
          child: Image.asset(icon, color: color, colorBlendMode: mode,),
        ),
      ),
    );
  }
}